//
//  PatientBookingData.m
//  StraightTrain
//
//  Created by mk on 15/11/27.
//  Copyright © 2015年 mk. All rights reserved.
//

#import "PatientBookingData.h"

@implementation PatientBookingInfoData

-(id)init
{
    if (self = [super init])
    {
        self.urlPath = @"";
        self.strDataKey = requestDataKey;
    }
    return self;
}

-(void)parseData:(id)dataObj
{
    [super parseData:dataObj];
    
    if ([dataObj isKindOfClass:[NSDictionary class]])
    {
        
        self.patien_id = NullObjToString(dataObj[@"id"]);//
        self.patien_refNo = NullObjToString(dataObj[@"refNo"]);//订单号
        self.patien_creatorId = NullObjToString(dataObj[@"creatorId"]);// 创建者id
        self.patien_status = NullObjToString(dataObj[@"status"]);//订单状态
        self.patien_statusCode = NullObjToString(dataObj[@"statusCode"]);//状态id
        self.patien_travelType = NullObjToString(dataObj[@"travelType"]);//希望转诊治疗
        self.patien_dateStart = NullObjToString(dataObj[@"dateStart"]);//
        self.patien_dateEnd = NullObjToString(dataObj[@"dateEnd"]);//
        self.patien_detail = NullObjToString(dataObj[@"detail"]);// 描述
        self.patien_apptDate = NullObjToString(dataObj[@"apptDate"]);// null,
        self.patien_dateConfirm = NullObjToString(dataObj[@"dateConfirm"]);//确认日期
        self.patien_remark = NullObjToString(dataObj[@"remark"]);//备注
        self.patien_dateCreated = NullObjToString(dataObj[@"dateCreated"]);//
        self.patien_dateUpdated = NullObjToString(dataObj[@"dateUpdated"]);//
        self.patien_dateNow = NullObjToString(dataObj[@"dateNow"]);//
        
    }
}


@end


@implementation PatientBookingListData

-(id)init
{
    if (self = [super init])
    {
        self.urlPath = @"";
        self.strDataKey = requestDataKey;
    }
    return self;
}

-(void)parseData:(id)dataObj
{
    [super parseData:dataObj];
    
    if ([dataObj isKindOfClass:[NSArray class]])
    {
        for (int i = 0; i < [dataObj count]; i++) {
            NSDictionary *dicRec = [dataObj objectAtIndex:i];
            PatientBookingInfoData *recData = [[PatientBookingInfoData alloc] init];
            [recData parseData:dicRec];
            [self.dataArray addObject:recData];
        }
    }
}


@end





